package action;



import interceptor.IbatisAware;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;

import dto.PensionInfo;

public class PensionDeleteAction extends ActionSupport implements Preparable, ModelDriven, IbatisAware {
	
	public static SqlMapClient sqlMapper;
	private PensionInfo paramClass;
	
	public String execute() throws Exception{
		
		sqlMapper.delete("deletePension", paramClass.getPen_num());
		
		return SUCCESS;
	}
	
	public PensionInfo getParamClass(){
		return paramClass;
	}
	public void setParamClass(PensionInfo paramClass){
		this.paramClass = paramClass;
	}
	@Override
	public void setIbatis(SqlMapClient sqlMapper) {
		// TODO Auto-generated method stub
		this.sqlMapper = sqlMapper;
	}

	@Override
	public Object getModel() {
		// TODO Auto-generated method stub
		return paramClass;
	}

	@Override
	public void prepare() throws Exception {
		// TODO Auto-generated method stub
		paramClass = new PensionInfo();
	}
	
	

}
